<?php
namespace BP\Sys;
require_once("BP/En/Map.php");
require_once("BP/Web/WebUser.php");
class RptTemplate extends Entity {
	public function getEnsName () 
	{
		return $this->GetValStringByKey(RptTemplateAttr::$EnsName);
	}
	public function setEnsName ($value) // [String value]
	{
		$this->SetValByKey(RptTemplateAttr::$EnsName, $value);
	}
	public function getFK_Emp () 
	{
		return $this->GetValStringByKey(RptTemplateAttr::$FK_Emp);
	}
	public function setFK_Emp ($value) // [String value]
	{
		$this->SetValByKey(RptTemplateAttr::$FK_Emp, $value);
	}
	public function getMyPK () 
	{
		return $this->GetValStringByKey(RptTemplateAttr::$MyPK);
	}
	public function setMyPK ($value) // [String value]
	{
		$this->SetValByKey(RptTemplateAttr::$MyPK, $value);
	}
	public function getD1 () 
	{
		return $this->GetValStringByKey(RptTemplateAttr::$D1);
	}
	public function setD1 ($value) // [String value]
	{
		$this->SetValByKey(RptTemplateAttr::$D1, $value);
	}
	public function getD2 () 
	{
		return $this->GetValStringByKey(RptTemplateAttr::$D2);
	}
	public function setD2 ($value) // [String value]
	{
		$this->SetValByKey(RptTemplateAttr::$D2, $value);
	}
	public function getD3 () 
	{
		return $this->GetValStringByKey(RptTemplateAttr::$D3);
	}
	public function setD3 ($value) // [String value]
	{
		$this->SetValByKey(RptTemplateAttr::$D3, $value);
	}
	public function getAlObjsText () 
	{
		return $this->GetValStringByKey(RptTemplateAttr::$AlObjs);
	}
	public function getAlObjs () 
	{
		return $this->GetValStringByKey(RptTemplateAttr::$AlObjs);
	}
	public function setAlObjs ($value) // [String value]
	{
		$this->SetValByKey(RptTemplateAttr::$AlObjs, $value);
	}
	public function getHeight () 
	{
		return $this->GetValIntByKey(RptTemplateAttr::$Height);
	}
	public function setHeight ($value) // [int value]
	{
		$this->SetValByKey(RptTemplateAttr::$Height, $value);
	}
	public function getWidth () 
	{
		return $this->GetValIntByKey(RptTemplateAttr::$Width);
	}
	public function setWidth ($value) // [int value]
	{
		$this->SetValByKey(RptTemplateAttr::$Width, $value);
	}
	public function getIsSumBig () 
	{
		return $this->GetValBooleanByKey(RptTemplateAttr::$IsSumBig);
	}
	public function setIsSumBig ($value) // [boolean value]
	{
		$this->SetValByKey(RptTemplateAttr::$IsSumBig, $value);
	}
	public function getIsSumLittle () 
	{
		return $this->GetValBooleanByKey(RptTemplateAttr::$IsSumLittle);
	}
	public function setIsSumLittle ($value) // [boolean value]
	{
		$this->SetValByKey(RptTemplateAttr::$IsSumLittle, $value);
	}
	public function getIsSumRight () 
	{
		return $this->GetValBooleanByKey(RptTemplateAttr::$IsSumRight);
	}
	public function setIsSumRight ($value) // [boolean value]
	{
		$this->SetValByKey(RptTemplateAttr::$IsSumRight, $value);
	}
	public function getPercentModel () 
	{
		return PercentModel->forValue($this->GetValIntByKey(RptTemplateAttr::$PercentModel));
	}
	public function setPercentModel ($value) // [PercentModel value]
	{
		$this->SetValByKey(RptTemplateAttr::$PercentModel, $value->getValue());
	}
	public function getHisUAC () 
	{
		$uac = new UAC();
		$uac->IsUpdate =  TRUE ;
		$uac->IsView =  TRUE ;
		return parent->getHisUAC();
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__String ($ensName) // [String ensName]
	{
		$me = new self();
		$me->setEnsName($ensName);
		$me->setFK_Emp($WebUser->getNo());
		$me->setMyPK((($WebUser->getNo() . "@") . $me->getEnsName()));
		try 
		{
			$me->Retrieve();
		}
		catch (\Exception $e)
		{
			$me->Insert();
		}
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Sys_RptTemplate", "报表模板");
		$map->setDepositaryOfEntity($Depositary->Application);
		$map->setEnType($EnType->Sys);
		$map->AddMyPK();
		$map->AddTBString(RptTemplateAttr::$EnsName, NULL, "类名",  FALSE ,  FALSE , 0, 500, 20);
		$map->AddTBString(RptTemplateAttr::$FK_Emp, NULL, "操作�?",  TRUE ,  FALSE , 0, 20, 20);
		$map->AddTBString(RptTemplateAttr::$D1, NULL, "D1",  FALSE ,  TRUE , 0, 90, 10);
		$map->AddTBString(RptTemplateAttr::$D2, NULL, "D2",  FALSE ,  TRUE , 0, 90, 10);
		$map->AddTBString(RptTemplateAttr::$D3, NULL, "D3",  FALSE ,  TRUE , 0, 90, 10);
		$map->AddTBString(RptTemplateAttr::$AlObjs, NULL, "要分析的对象",  FALSE ,  TRUE , 0, 90, 10);
		$map->AddTBInt(RptTemplateAttr::$Height, 600, "Height",  FALSE ,  TRUE );
		$map->AddTBInt(RptTemplateAttr::$Width, 800, "Width",  FALSE ,  TRUE );
		$map->AddBoolean(RptTemplateAttr::$IsSumBig,  FALSE , "是否显示大合�?",  FALSE ,  TRUE );
		$map->AddBoolean(RptTemplateAttr::$IsSumLittle,  FALSE , "是否显示小合�?",  FALSE ,  TRUE );
		$map->AddBoolean(RptTemplateAttr::$IsSumRight,  FALSE , "是否显示右合�?",  FALSE ,  TRUE );
		$map->AddTBInt(RptTemplateAttr::$PercentModel, 0, "比率显示方式",  FALSE ,  TRUE );
		$this->set_enMap($map);
		return $this->get_enMap();
	}
}
?>
